/**
 * @file src/Functions/enumerateNucleotide.cpp
 *
 * @section DESCRIPTION
 * Stores the enumerateNucleotide function.
 *
 * @date 31-mar-2013
 *
 * @author Youri Hoogstrate
 *
 * @section LICENSE
 * yh-kt-fold can predict RNA 2D structures including K-turns.
 * Copyright (C) 2012-2013 Youri Hoogstrate
 *
 * This file is part of yh-kt-fold.
 *
 * yh-kt-fold is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * yh-kt-fold is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */



#include "main.h"
#include "Functions/library.h"



using namespace std;



/**
 * @brief Enumerates a nucleotide
 *
 * @date 31-mar-2013
 *
 * @param nucleotide
 *
 * @return for Adenine:         NUCLEOTIDE_A (0)
 *         for Cytosine:        NUCLEOTIDE_C (1)
 *         for Guanine:         NUCLEOTIDE_G (2)
 *         for Uracil/Tyrosine: NUCLEOTIDE_U (3)
 *         otherwise:           NUCLEOTIDE_NONE (-1)
 *
 * @todo find out whether lowercase and 'u' are neccesairy
 */
int enumerateNucleotide(char nucleotide)
{
	switch(nucleotide)
	{
		case 'A':
		case 'a':
			return NUCLEOTIDE_A;
			break;
		case 'C':
		case 'c':
			return NUCLEOTIDE_C;
			break;
		case 'G':
		case 'g':
			return NUCLEOTIDE_G;
			break;
		case 'T':
		case 't':
		case 'U':
		case 'u':
			return NUCLEOTIDE_U;
			break;
		default:
			return NUCLEOTIDE_NONE;
			break;
	}
}
